x
module teapo.persistence { export interface Drive { files(): string[];​ read(file: string): string;​ write(file: string, content: string); } export module Drive { export interface DriveMirror { write(file: string, content: string); } export interface Optional { detect(uniqueId: string, callback: (error: Error, detached: Detached) => void ): void; } export interface Detached { timestamp: number; apply(mainDrive: Drive, callback: (loaded: DriveMirror) => void): void; purge(callback: (loaded: DriveMirror) => void): void; } }}